/**
 * 
 */
package com.dp.struct.adapter;

import java.util.Enumeration;
import java.util.Iterator;

/**
 * This is an adaptor class
 * 
 * @author Sunaina.Sharma
 * 
 */
public class EnumerationIterator implements Iterator<String> {
	Enumeration<String> myEnumeration;

	EnumerationIterator(Enumeration<String> enumeration) {
		this.myEnumeration = enumeration;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.Iterator#hasNext()
	 */
	public boolean hasNext() {
		return myEnumeration.hasMoreElements();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.Iterator#remove()
	 */
	public void remove() {
		throw new UnsupportedOperationException();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.Iterator#next()
	 */
	public String next() {
		return myEnumeration.nextElement();
	}

}
